import React, {Component} from 'react';
import {StoreProvider} from 'iflux2';
import {Form} from 'antd';

import AppStore from './store';
import GoodsTypeSet from './component/type-set';
import CommentsSet from './component/comment-set';
import SalesNumSet from './component/sales-num-set';
import AuditSet from './component/audit-set';
import Save from './component/save';

@StoreProvider(AppStore)
export default class GoodSet extends Component {
  static defaultProps = {
    layoutProps: {
      labelCol: {
        span: 6 
      },
      wrapperCol: { 
        span: 18 
      }
    }
  }
  componentDidMount() {
    this.props.store.init();
  }
  render() {
    let {layoutProps} = this.props;
    return (
      <div className="goods-set">
        <Form className="pusht">
          <GoodsTypeSet layoutProps={layoutProps}/>
          {/*<AuditSet layoutProps={layoutProps}/>*/}
          <SalesNumSet layoutProps={layoutProps}/>
          <CommentsSet layoutProps={layoutProps}/>
        </Form>
        <Save />
      </div>
    )
  }
}